import React, {PropsWithChildren} from 'react'
import styles from "./StatisticCard.module.sass"
import {Tooltip, Typography} from "antd";
import {QuestionCircleOutlined} from "@ant-design/icons";

export interface StatisticCardProps extends PropsWithChildren {
    title: string
    value: string
    tips?: string
}

const StatisticCard: React.FC<StatisticCardProps> = (props) => {
    return <>
        <div className={styles.container}>
            <Typography.Text>{props.title}{!!props.tips &&
                <Tooltip title={props.tips}><QuestionCircleOutlined/></Tooltip>}
            </Typography.Text>
            <Typography.Text strong>{props.value}</Typography.Text>
        </div>
    </>
}

export default StatisticCard


